home *** CD-ROM | disk | FTP | other *** search
- Path: user2.mnsinc.com!huang
- From: huang@mnsinc.com (Szu-Wen Huang)
- Newsgroups: comp.lang.c++,comp.lang.c,comp.object,comp.software-eng
- Subject: Re: Portability of code & skills (Beware of "C" Hackers etc)
- Followup-To: comp.lang.c++,comp.lang.c,comp.object,comp.software-eng
- Date: 26 Mar 1996 01:41:34 GMT
- Organization: Monumental Network Systems
- Message-ID: <4j7i0e$b7k@news1.mnsinc.com>
- References: <4ikb6kINN1is@mayne.ugrad.cs.ubc.ca> <3150415E.6396@sdt.com> <4ip5om$s9@bughouse.imonics.com> <4isfcu$p09@news1.mnsinc.com> <4j6c48$4mr@bughouse.imonics.com>
- NNTP-Posting-Host: user.mnsinc.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Imonics Corporation (rcook@imonics.com) wrote:
-
- : Well, you got the "mean" part right. As for not being for non-experts,
- : there sure are a lot of people touting Unix as the only good
- : operating system for any purpose. Sheesh.
-
- That's of course absurd. Unix is large and powerful, and obviously
- unsuitable for small systems.
-
- : As for "necessity": it is not necessary to name the list files command "ls",
- : the help function "man", the print function "lp", and the editor "vi".
- : It is not and was never necessary to limit options to single case-
- : sensitive letters so that you have to remember all the magic mumbles
- : to do your work. It is not necessary to give "cute" names to things
- : (say, "set noclobber"). These things don't save enough space to be
- : worth mentioning, even on the old 8-bit machines. I don't believe
- : that's why it was done; do you have any evidence? Would it have
- : taxed those early systems if the "ls" command had been named, say,
- : "list"? Or "dir"?
-
- I can't say for sure what was the exact reason, but I would venture to
- guess that being shorter to type was probably more important than size.
- After all, directory entries probably occupy the same length anyway.
- The command line parameters are short for a good reason, though. It
- makes them easy to parse (you can use a case statement instead of having
- to do a series of strcmp()), and lessens the overhead code.
-
- : I think part of it is blindness -- I think those people honestly think
- : that, if an abbreviation is good enough for them, it is good enough for
- : everyone. That's why the namespace for Unix commands is such a bloody
- : mess. They couldn't even keep consistent within their own commands;
- : "cd" for "change directory", but "pwd" for "print working directory".
- : Well, is it a "directory" or a "working directory"? Come to think of
- : it, when else is it ever called a working directory?
-
- The working directory is where you are currently working :).
-
- : But I really do think that most of it is fascination with the ultimate
- : video game. Look at this neat thing I can do, all I have to enter
- : is "awk -syLgX -poop -l cfgfile".
-
- I disagree. As I pointed out above, single-letter options are efficient
- in terms of the code required to understand them.
-
- : And, yeah, I can define aliases for commands as I want. But it should
- : not be the purpose of aliases to bring order to the chaos. And all the
- : documentation, such as it is, uses the obscure names for everything.
- : I'm sorry, but your argument that it was necessary on limited machines
- : doesn't hold water. Can you come up with anything better?
-
- Remember you're talking about an OS designed almost 30 years ago. If
- you were around for the Apple ][, you'll feel the squeeze memory places
- upon you. While not always effective, a good programmer just consciously
- and unconsciously save space. It's really only in the 80s that we had
- the luxury to say, "who cares, it's just a few more bytes".
-
- : What I'm complaining about, in this particular paragraph, is your very
- : argument -- "when computers were smaller, this was necessary". My point
- : is that it was never necessary to save microseconds in a piece of code
- : just before the system prompted the user for an answer to something.
-
- The case you cite is clearly one where optimizations are a waste of
- time. However, programming is largely a matter of habit, and good
- programmers pick up habits over time. If that "optimization" was
- effortless to do, then there's no big deal, right? If somebody looks
- over a piece of code and optimizes 2 instructions right before a
- prompt, that is not a programmer I wish to defend ;).
-
- : I'm not talking about a general-purpose routine, or something in a loop,
- : but cases where people seem to worry about tiny performance issues
- : even while they're gathering requirements, before they have any notion
- : of whether or where performance problems will be.
-
- Those are not engineers, then. Engineers solve problems, but only
- when there is a problem, or at least when a problem is obviously
- imminent. If it ain't broke, ... ;)
-
- : That whole mindset of saving microseconds has been poor engineering since
- : at least my entry into programming, on F8s and Z80s, in 1977. It's a
- : red herring, meant to justify poor engineering that hasn't been "necessary"
- : (at least) since 3rd-generation languages became common.
-
- Hmm, as I said, more and more people profile before optimization. Habits
- are not easy to break, but those who can't break bad habits are naturally
- selected for extinction. Don't worry. :)
-